package com.flying;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

//@EnableJpaRepositories(basePackages = "com.flying.*")
@SpringBootApplication//(scanBasePackages = "com.flying.*")
//@EntityScan(basePackages = {"com.flying.*"})
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

//    public static void main(String[] args) {
    //SpringApplication.run(MainApplication.class, args);
//        SpringApplication app=new SpringApplication(Application.class);

//        Appctx.ctx=app.run(args);
        /*UserService suserService = (UserService) Appctx.ctx.getBean("suserService");
        SysUser su= suserService.findByName("TEST");
        BCryptPasswordEncoder bc=new BCryptPasswordEncoder(4);//将密码加密 可以先设置初始密码：000000
        su.setPassword(bc.encode(su.getPassword()));//然后使用密码为key值进行加密，运行主类后，会自动加密密码，可连接数据库查看。
        System.out.println("密码"+su.getPassword());
        suserService.update(su);//运行一次后记得注释这段重复加密会无法匹配*/
}